<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.app.service.vo.RoleVo"%>

<script type="text/javascript">
	function manageDiv(src) {
		var divplay = document.getElementById(src).style.display;
		if (divplay == "") {
			document.getElementById(src).style.display = "none";
		} else {
			document.getElementById(src).style.display = "";
		}

	}
</script>

	<form action="<%=request.getContextPath()%>/rule/rulesave.form"
		method="post">
		<div class="nav-list clearfix">	<a href="javaScript:manageDiv('rulediv')">增加新角色</a></div>
		<div class="yuan-div">
		<div class="data-table eos-m-l"><table style="font-family: arial, 宋体; font-size: 12px;" width="100%" cellpadding="0" cellspacing="0">
		<thead>
            	<tr>
                	 <th>角色名</th>
					<th>操作</th>
                </tr>
            </thead>
			  <tbody>
			<%
				List<RoleVo> list = (List<RoleVo>) request
						.getAttribute("role-list");
				for (RoleVo vo : list) {
			%>
			<tr>
				<td><%=vo.getName()%></td>
				<td><a
					href="<%=request.getContextPath()%>/rule/showrule.form?roleid=<%=vo.getId()%>">查看具体角色信息</a>
				</td>
			</tr>

			<%
				}
			%>
			  </tbody>
		</table>
		</div>
		<div id="rulediv" style="display:none">
			<hr>
			<table style="font-family: arial, 宋体; font-size: 12px;" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td>角色名：</td>
					<td><input type="text" name="name" />
					</td>
				</tr>
				<tr>
					<td>角色描述</td>
					<td><textarea rows="" cols="" name="rolesDescription"></textarea>
					</td>
				</tr>
			</table>
			<p>
				<input type="submit" />
			</p>
		</div>
		</div>
	</form>

